#ifndef __IMAGE_H__
#define __IMAGE_H__

#ifdef __cplusplus
extern "C"{
#endif


  typedef struct image Image_, *Image;
  struct image {
    int width, height;
    unsigned char *image;
  };


  Image
  _IMGcreate_image(int width, int height);

  void
  _IMGfree_image(Image image);

  void
  _IMGclear(Image image, unsigned char value);

  int
  _IMGload_pgm(const char *fm_name, Image tempimg);

  int
  _IMGsave_pgm(const char *fm_name, Image tempimg);

  void
  _IMGzoom(Image src, Image dst, double mag_x, double mag_y);

  int
  _IMGget_y(const Image src, Image dst);

  int
  _IMGhalf(const Image src, Image dst);

#ifdef __cplusplus
}
#endif

#endif /* __IMAGE_H__ */
